package com.bdqn.design;

import com.bdqn.design.dao.NewsDao;
import com.bdqn.design.factory.NewsDaoMongoDBImplFactory;
import com.bdqn.design.pojo.News;
import com.bdqn.design.service.NewsService;
import com.bdqn.design.service.impl.NewsServiceImpl;

/**
 * Test02AbstractDaoFactory
 *
 * @author LILIBO
 * @since 2024/7/4
 */
public class Test02AbstractDaoFactory {

    public static void main(String[] args) {
        NewsDao instance = new NewsDaoMongoDBImplFactory().getInstance();
        NewsService newsService = new NewsServiceImpl(instance);
        newsService.save(new News());
    }

}
